package com.bocloud.controller;

import com.bocloud.model.Result;
import com.bocloud.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping(value = "/role")

public class RoleController {

    @Autowired
    RoleService roleService;

    /**
     * 用途：获取角色表中的所有数据
     *
     * @param
     * @return ：Result
     */
    @RequestMapping(value = "/getallro")
    @ResponseBody
    public Result selAllRole() {
        return new Result(true, roleService.getAllRole(), "");
    }


}

